﻿<%@ Page Language="C#" MasterPageFile="~/MainPage.master" AutoEventWireup="true"
    CodeFile="Products.aspx.cs" Inherits="Products" Title="Products" %>

<asp:Content ID="webProductsTitle" ContentPlaceHolderID="cphTitle" runat="server">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">
                Products
            </h1>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="Home.aspx">Home</a> </li>
                <li class="active"><i class="fa fa-file"></i>Products </li>
            </ol>
        </div>
    </div>
</asp:Content>
<asp:Content ID="webProducts" ContentPlaceHolderID="cphMainPage" runat="Server">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <link href="css/CSSGridView1.css" rel="stylesheet" type="text/css" />
        <title>Orders</title>
    </head>
    <body>
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td style="width: 113px">
                    Product ID :
                </td>
                <td style="width: 142px">
                    <asp:TextBox ID="txtProductID" name="txtProductID" runat="Server" Enabled="false" width="100%"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px; height: 10px;">
                </td>
                <td style="height: 10px; width: 142px;">
                </td>
                <td style="height: 10px">
                    &nbsp;</td>
                <td style="height: 10px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px">
                    Product Name :
                </td>
                <td style="width: 142px">
                    <asp:TextBox ID="txtProductName" name="txtProductName" runat="Server" 
                        width="100%" MaxLength="40"></asp:TextBox>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="rfvProductName" runat="server" ErrorMessage="Name is required"
                        ControlToValidate="txtProductName" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px; height: 10px;">
                </td>
                <td style="height: 10px; width: 142px;">
                </td>
                <td style="height: 10px">
                    &nbsp;</td>
                <td style="height: 10px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px">
                    Category Name :
                </td>
                <td style="width: 142px">
                    <asp:DropDownList ID="ddlCategoryName" name="ddlCategoryName" runat="Server" Height="22px" width="100%">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px; height: 10px;">
                </td>
                <td style="height: 10px; width: 142px;">
                </td>
                <td style="height: 10px">
                    &nbsp;</td>
                <td style="height: 10px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px">
                    Product Quantity:<br />
&nbsp;</td>
                <td style="width: 142px">
                    <asp:TextBox ID="txtQuantity" name="txtPrice" runat="Server" width="100%"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px; height: 10px;">
                </td>
                <td style="height: 10px; width: 142px;">
                </td>
                <td style="height: 10px">
                    &nbsp;</td>
                <td style="height: 10px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px">
                    Unit Price :
                </td>
                <td style="width: 142px">
                    <asp:TextBox ID="txtPrice" name="txtPrice" runat="Server" width="100%"></asp:TextBox>
                </td>
                <td>
                    <asp:RegularExpressionValidator ID="revPrice" runat="server" ErrorMessage="Decimal is required"
                        ValidationExpression="^[0-9]+(\.([0-9])+)?$" ControlToValidate="txtPrice"></asp:RegularExpressionValidator>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px; height: 11px;">
                </td>
                <td style="height: 11px; width: 142px;">
                    <asp:RequiredFieldValidator ID="rfvPrice" runat="server" ErrorMessage="Price is required"
                        ControlToValidate="txtPrice" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
                <td style="height: 11px">
                    &nbsp;</td>
                <td style="height: 11px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 113px">
                    isActive :
                </td>
                <td colspan="3">
                    <asp:CheckBox ID="chkIsActive" name="chkDiscontinued" Text=" " runat="Server" />
                </td>
            </tr>
            <tr>
                <td style="height: 10px;" colspan="4">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btnNew" name="btnNew" Text="New" runat="Server" OnClick="btnNew_Click"
                        CausesValidation="False" Width="39px" />
                    <asp:Button ID="btnAdd" name="btnAdd" Text="Add" runat="server" OnClick="btnAdd_Click" />
                    <asp:Button ID="btnSave" name="btnSave" Text="Save" runat="server" OnClick="btnSave_Click" />
                </td>
                <td colspan="2">
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="4" style="height: 10px">
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <asp:DropDownList ID="ddlSearchBy" name="ddlSearchBy" runat="Server" OnTextChanged="ddlSearchBy_TextChanged"
                        AutoPostBack="true" style="height: 32px">
                        <asp:ListItem Text="ID"></asp:ListItem>
                        <asp:ListItem Text="Product Name"></asp:ListItem>
                        <asp:ListItem Text="Category Name"></asp:ListItem>
                        <asp:ListItem Text="Supplier Name"></asp:ListItem>
                        <asp:ListItem Text="Price"></asp:ListItem>
                        <asp:ListItem Text="Discontinued"></asp:ListItem>
                        <asp:ListItem Text="Supplier ID"></asp:ListItem>
                        <asp:ListItem Text="Category ID"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox ID="txtSearch" name="txtSearch" runat="server" BorderColor="LightSlateGray"></asp:TextBox>
                    <asp:CheckBox ID="chkSearchDiscontinued" name="chkSearchDiscontinued" Text=" " runat="server" />
                    <asp:Button ID="btnSearch" name="btnSearch" Text="Search" runat="Server" OnClick="btnSearch_Click"
                        CausesValidation="False" />
                    <asp:Button ID="btnRefresh" name="btnRefresh" Text="Refresh" runat="Server" OnClick="btnRefresh_Click"
                        CausesValidation="False" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    &nbsp;
                </td>
                <td style="width: 395px">
                    &nbsp;</td>
                <td style="width: 395px">
                    &nbsp;</td>
            </tr>
        </table>
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td style="width: 756px">
                    <asp:GridView ID="gvProducts" name="gvProducts" runat="server" CssClass="Grid" AlternatingRowStyle-CssClass="alt"
                        PagerStyle-CssClass="pgr" OnSelectedIndexChanged="gvProducts_SelectedIndexChanged"
                        OnPageIndexChanging="gvProducts_PageIndexChanging" AllowSorting="True" 
                        onsorting="gvProducts_Sorting">
<PagerStyle CssClass="pgr"></PagerStyle>

<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </body>
    </html>
</asp:Content>
